home *** CD-ROM | disk | FTP | other *** search
- Path: pangea.Stanford.EDU!karish
- From: karish@pangea.Stanford.EDU (Chuck Karish)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
- Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
- Date: 15 Apr 1996 20:30:38 GMT
- Organization: Mindcraft, Inc.
- Message-ID: <4kuble$35k@nntp.Stanford.EDU>
- References: <JSA.96Feb16135027@organon.com> <dewar.829345962@schonberg> <4knqun$ga1@nntp.Stanford.EDU> <dewar.829399701@schonberg>
- NNTP-Posting-Host: pangea.stanford.edu
-
- In article <dewar.829399701@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:
- >Chuck asked (replying to me):
- >
- >">Of course GCC has a much more agressive view of portability, but it
- >>certainly would be nice to see more standardization here,
- >
- >I don't understand. Do you have portability problems when you use
- >gcc in ANSI mode?"
-
- >Yes we do. gcc takes the view that it should work in all common C
- >environments (i.e. those in use today), whether or not they are ANSI
- >compliant. Early on when I started writing some C runtime code for
- >GNAT (or more accurately interfacing to standard C runtime routines),
- >I followed the ANSI standard. As I mentioned before the particular
- >example I remember is that I used the return value of sprintf,
- >assuming it returned int. My code worked on several systems, and
- >then failed on SunOS, and I was told -- oh yes, everyone knows that
- >you cannot use the returned value of sprintf. Now of course it is
- >the case that there must be available on SunOS a conforming library,
- >but we require gcc to work with all commonly used environments without
- >any special fiddling in choosing libraries.
-
- While I applaud the attempt to make gcc work even with broken
- C libraries, I don't think it's particularly productive to
- describe gcc as being flawed when this turns out not to be
- possible.
-
- >That's what I meant by
- >saying that gcc has a more strenuous view of portability. Chuck's
- >view of portablity seems to be "use ANSI, and too bad if it doesn't
- >work for you".
-
- That's not the way I work and it's not the way I've described
- my approach in this thread.
-
- >That's fair enough but it is not the attitude that
- >gcc takes, where we are aiming for much more general portability.
-
- There are limits to what can be accomplished this way. ANSI
- C and traditional C are different languages.
- --
-
- Chuck Karish karish@mindcraft.com
- (415) 323-9000 x117 karish@pangea.stanford.edu
-